package fr.utt.lo02.CrazyEights.view.GamePanel;

import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.Insets;

import javax.swing.JPanel;

/**
 * A Generic class for players panel
 * @author Jeremy
 *
 */
public class PlayersPanel extends JPanel{
	
	private static final long serialVersionUID = 1L;
	
	/**
	 * Use to add a component in the panel
	 * @param comp component
	 * @param gridx gridx
	 * @param gridy gridy
	 * @param weightx weightx
	 * @param weighty weighty
	 * @param gridwidth gridwidth
	 * @param gridheight gridheight
	 * @param fill fill
	 * @param anchor anchor
	 * @param insets insets
	 */
	public void addComponent(Component comp, int gridx, int gridy, double weightx, double weighty, int gridwidth, int gridheight, int fill, int anchor, Insets insets){
		GridBagConstraints c = new GridBagConstraints();
		c.gridwidth = gridwidth;
		c.gridheight = gridheight;
		c.gridx = gridx;
		c.gridy = gridy;
		c.weightx = weightx;
		c.weighty = weighty;
		c.fill = fill;
		c.anchor = anchor;
		c.insets = insets;
		this.add(comp,c);
	}
}
